<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">

<section class="content-header">
    <h1>制作件计划</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" onsubmit="return false;">
                        <span style="font-size: 1.5em;">[[${proCode}]]&nbsp;&nbsp;&nbsp;[[${proName}]] &nbsp;&nbsp;&nbsp;[[${proNum}]][[${unit}]]</span>
                        <hr>
                        <div class="row">
                            <div class="form-inline">
                                <input type="hidden" name="proCode" th:value="${proCode}">
                                <div class="form-group">
                                    <label for="query-special">类型</label>
                                    <select id="query-special" class="form-control" name="special">
                                        <option value="" selected>请选择</option>
                                        <option th:each="type : ${specials}" th:value="${type.name}"
                                                th:text="${type.name}" th:selected="${type.name == special}"></option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="query-part">部分</label>
                                    <input id="query-part" type="text" name="part" class="form-control"
                                           placeholder="请输入部分" th:value="${proPart}">
                                </div>
                                <div class="form-group">
                                    <label for="query-postName">提报人</label>
                                    <input id="query-postName" th:value="${postName}" type="text" name="postName" class="form-control">
                                </div>

                                <div class="form-group">
                                    <label for="query-startTime">日期</label>
                                    <input id="query-startTime" type="text" class="form-control datepicker" name="startTime"
                                           readonly="readonly"/>
                                    <label for="query-endTime"> 至 </label>
                                    <input id="query-endTime" type="text" class="form-control datepicker" name="endTime"
                                           readonly="readonly"/>
                                </div>
                                <button type="button" class="btn btn-success" id="btn-search"
                                        onclick="js.table.search(table)">
                                    <span class="Bold">搜索</span>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">

    let table;

    $(function () {

        /** 加载列表 */
        table = js.table.init({
            url: ctx + "task/designTask/process/makeResultList",
            showExport: false,
            columns: [
                {
                    title: '序号', field: 'id', width: '50',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: "类型", field: 'special',width:'70'},
                {title: "部分", field: 'part',width:'150'},
                {title: "图号", field: 'drawNo',width:'200'},
                {title: "图名", field: 'drawName'},
                {title: "数量", field: 'drawNum'},
                {title: "制作件类型", field: 'makeType',width:'150'},
                {title: "备注", field: 'remark',width:'150'},
                {title: "提报人", field: 'postName'},
                {title: "提报日期", field: 'UpdateTime'},
                {title: "批准时间", field: 'verifyTime'}
            ]
        });
    });
</script>
</body>
</html>
